package com.bwie.controller;

import com.bwie.pojo.TbBrand;
import com.bwie.service.TbBrandService;
import com.bwie.utils.R;
import com.bwie.utils.Result;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zhaijiaqi
 * @Date: 2025/5/23 13:51
 * @Description:
 **/
@RestController
@RequestMapping("/shop/index")
public class IndexController {

    @Autowired
    TbBrandService tbBrandService;

    /**
     * 添加品牌
     * @return
     */
    @PostMapping("/AddBrand")
    public Result AddBrand(@RequestBody TbBrand tbBrand){
        return tbBrandService.AddBrand(tbBrand);
    }

    /**
     * 品牌列表
     * @return
     */
    @PostMapping("/BrandList")
    public Result BrandList(@RequestBody PageInfoVo pageInfoVo){
        return tbBrandService.BrandList(pageInfoVo);
    }

    /**
     * 修改状态
     * @param tbBrand
     * @return
     */
    @PostMapping("/updateStatus")
    public Result updateStatus(@RequestBody TbBrand tbBrand){
        return tbBrandService.updateStatus(tbBrand);
    }


}
